package designMode.buildMode.factoryMethod.staticFactory;

import designMode.buildMode.factoryMethod.staticFactory.impl.MailSender;
import designMode.buildMode.factoryMethod.staticFactory.impl.SmsSender;

/**
 * Created by Administrator on 2018/4/10.
 */
public class SenderFactory {

    public static Sender produceMail() {
        return new MailSender();
    }

    public static Sender produceSms() {
        return new SmsSender();
    }

    public static void main(String[] args) {
        Sender sender = SenderFactory.produceSms();
        sender.send();

        SenderFactory.produceMail().send();
    }
}
